package de.justphil.tcg.tcgserver.websockets.interfaces;

import org.glassfish.grizzly.websockets.WebSocket;


import de.justphil.tcg.tcgserver.game.GameManager;
import de.justphil.tcg.tcgserver.websockets.TCGWebSocket;

public interface TCGAppManageable {
	public void removeGame(long gameId);
	public void commitGameChange(long gameId, GameManager game);
	public void createWebSocketToGameIdMapping(WebSocket socket, long gameId);
	public void removeWebSocketToGameIdMapping(WebSocket socket);
	public TCGWebSocket getWebSocketByPlayerId(long playerId);
	public void createPlayerIdToWebSocketMapping(long playerId, WebSocket socket);
	public void removePlayerIdToWebSocketMapping(long playerId);
	//public void maintainInGameWebSocket(WebSocket socket);
	public void signalReconnectedPlayer(long playerId);
	public void signalNewGameStarted(long gameId);
	public void signalFirstPlayerJoined(long gameId);
	public void signalGameExpired(long gameId, String gameOtp);
	public void signalGameOver(long gameId, long winnerId, String gameOtp);
	public void cleanUp(long gameId, long[] playerIds, boolean cleanUpNewGameMonitor);
	public void printStatus();
}
